<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/WEB-INF/struts-tags.tld"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>欢迎访问信息产品运营互动中心！</title>


<script type="text/javascript" src="<s:url value="/script/jquery.js"/>"></script> 
<script type="text/javascript" src="<s:url value="/script/jquery.validate.js"/>"></script>

<style type="text/css">
#saveProductReference label { width: 20px; align: right; }
#saveProductReference label.error{ width: 200px; color:red}, 
#saveProductReference input.submit { margin-left: 3px; }
</style>

<script type="text/javascript"> 
	
	$(document).ready(function(){ 
		$.validator.setDefaults({
			submitHandler: function() { alert("submitted!"); }
		});
		
		$("#saveProductReference").validate(); 
		
	}); 
	
</script>

<link rel="stylesheet" href="<s:url value="/css/style.css"/>">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<table width="998" border="0" cellspacing="0" cellpadding="0"
	align="center">
	<tr>
		<td background="<s:url value="/images/home_4a.gif"/>">
		<table width="863" border="0" cellspacing="0" cellpadding="0"
			align="center" bgcolor="#FFFFFF">
			<tr>
				<td width="20%" valign="top">
				<table width="863" border="0" cellspacing="0" cellpadding="0"
					align="center" bgcolor="#FFFFFF">
					<tr>
						<td width="197" valign="top">
						<%@ include file="/commons/include/catalog_left.inc"%>  
						</td>
						<td valign="top">
						<s:form action="saveProductReference.action"
							namespace="/security" method="post" enctype="multipart/form-data" >
							<input type="hidden" name="productReference.id"
								value="${productReference.id}">
							<input type="text" name="abc"
								value="" class="required">
							<input type="text" name="ddd"
								value="" class="required55">
							<table width="660" border="0" cellspacing="0" cellpadding="0"
								background="<s:url value="/images/catalog_manage_8b.gif"/>">
								<tr>
									<td><img
										src="<s:url value="/images/catalog_manage_8.gif"/>"
										width="660" height="11" alt=""></td>
								</tr>
								<tr>
									<td>
									<TABLE width="80%" cellSpacing=1 cellPadding=0 align="center">
										<TR height=30>
											<TD align=left width="10%"><input type="submit"
												name="Submit" value="保 存"> <input type="button"
												value="返 回"
												onClick="location.href='listProductReference.action'">
											</TD>
										</TR>
									</table>
									<s:if test="#returnMsg==null">
										<TABLE width="80%" cellSpacing=1 cellPadding=0 align="center">
											<TR height=30>
												<TD align=left width="10%"><font color="red">红色*号表示
												为必填项</font></TD>
											</TR>
										</table>
									</s:if> <s:else>
										<TABLE width="80%" cellSpacing=1 cellPadding=0 align="center">
											<TR height=30>
												<TD align=left width="10%"><font color="red">${returnMsg}</font>
												</TD>
											</TR>
										</table>
									</s:else>
									<div class="validate"> 
									<table width="80%" border="0" cellspacing="0" cellpadding="7"
										align="center" class=tablecolor2>
										<tr>
											<td width="19%" bgcolor="D6E3FA">
											<div align="right"><font color="red">*</font>所属产品：</div>
											</td>
											<td width="81%"><s:select
												name="productReference.product.id" list="products"
												listKey="id" listValue="name" theme="css_xhtml" /></td>
										</tr>
										<tr>
											<td width="19%" bgcolor="D6E3FA">
											<div align="right"><font color="red">*</font>资料类型：</div>
											</td>
											<td width="81%"><s:select
												name="productReference.referenceType.id" list="lRefType"
												listKey="id" listValue="name" theme="css_xhtml" /></td>
										</tr>
										<tr>
											<td width="19%" bgcolor="D6E3FA">
											<div align="right"><font color="red">*</font>标&nbsp;&nbsp;&nbsp;&nbsp;题：</div>
											</td>
											<td width="81%">
											<s:textfield
												name="productReference.title" theme="css_xhtml" size="64"/></td>
										</tr>
										<tr>
											<td width="19%" bgcolor="D6E3FA">
											<div align="right"><font color="red">*</font>内&nbsp;&nbsp;&nbsp;&nbsp;容：</div>
											</td>
											<td width="81%"><s:textarea
												name="productReference.content" theme="css_xhtml" cols="50" rows="6" 
												wrap="true" cssClass="required"/></td>
										</tr>
										<tr>
											<td width="19%" bgcolor="D6E3FA">
											<div align="right" class="STYLE2">附&nbsp;&nbsp;&nbsp;&nbsp;件：</div>
											</td>
											<td width="81%">
											<table width="100%" border="0" class=tablecolor2>
												<tr>
													<td width="" align="center" bgcolor="D6E3FA">附件名称</td>
													<td width="50" align="center" bgcolor="D6E3FA">是否发布</td>
													<td width="50" align="center" bgcolor="D6E3FA">删除</td>
												</tr>
												<s:iterator id="attach" value="attachs">
												<input type="hidden" name="attachIDs" value="<s:property value="id" />"/>
												<tr>
													<td>
														<a href="<s:url value="/common/showFile.action?attach.id="/><s:property value="id" />"
															target="_blank">
															<s:property value="fullName" />
														</a>
													</td>
													<td align="center"><input type="checkbox"
														name="publishIDs" value="<s:property value="id" />"
 														<s:if test="isPublish==1">checked</s:if>></td>
													<td align="center"><input type="checkbox"
														name="delIDs" value="<s:property value="id" />"></td>
												</tr>
												</s:iterator>
											</table>
											<br/>
											<table width="100%" border="0" class=tablecolor2>
												<tr>
													<td width="" colspan="2" align="left" bgcolor="D6E3FA">附件上传</td>
												</tr>
												<tr>
													<td width="10px">&nbsp;</td>
													<td align="left">
														<input type="file" name="upload" size="40"/>
													</td>
												</tr>
												<tr>
													<td>&nbsp;</td>
													<td>
														<input type="file" name="upload" size="40"/>
													</td>
												</tr>
												<tr>
													<td>&nbsp;</td>
													<td>
														<input type="file" name="upload" size="40"/>
													</td>
												</tr>
											</table>
											</td>
										</tr>
										<tr>
											<td width="19%" bgcolor="D6E3FA">
											<div align="right"><font color="red">*</font>关&nbsp;键&nbsp;字：</div>
											</td>
											<td width="81%"><s:textfield
												name="productReference.keyword" theme="css_xhtml" /></td>
										</tr>
										<input type="hidden" name="productReference.creator"
											value="${productReference.creator}">
										<input type="hidden" name="productReference.begin"
											value="<s:date name="productReference.begin" format="yyyy-MM-dd hh:mm"/>">
										<input type="hidden" name="productReference.end"
											value="<s:date name="productReference.end" format="yyyy-MM-dd hh:mm"/>">
									</table>
									</div>
									</td>
								</tr>
								<tr>
									<td><img
										src="<s:url value="/images/catalog_manage_8a.gif"/>"
										width="660" height="9"></td>
								</tr>
							</table></td>
					</tr>
				</table>
				</s:form> 
</body>
</html>
<script>
<!--
	function uploadFile(id) {
		window
				.open(
						'<s:url value="/common/uploadFile.action?attach.refEntity=PRODUCTREFERENCE&attach.refEntityID="/>'
								+ id, "uploadfile",
						"dialogWidth=420px;dialogHeight=300px");
	}
	
	function addComponent()
	{
		var uploadHTML=document.createElement("<input type='file'　name='upload'/>");
		document.getElementById("files").appendChild(uploadHTML);
		uploadHTML=document.createElement("<p/>");
		document.getElementById("files").appendChild(uploadHTML);
	}
-->
</script>